home *** CD-ROM | disk | FTP | other *** search
Text File | 1993-03-22 | 2.6 KB | 79 lines | [TEXT/PCXT] |
- This ZIP archive holds three files
- readme.txt
- encode.c
- decode.c
-
-
- decode.c is source program that reads a VCRPLUS code
- number value you find in the newspaper and calculates
- date_of_the_tv_program
- starting_time_of_the_tv_program
- run_length_of_the_tv_program
-
-
- encode.c is source program that reads a date, start time,
- and run length then turns them into a VCRPLUS code number
- like the ones in the newspaper.
-
-
-
- There are a few weak spots in these programs.
-
- 1. They only work for the usual kinds of tv shows,
- a. Must start on an even half-hour or hour
- b. Must end on an even half-hour or hour
-
- 2. They only handle VCRPLUS code values that are 1-6 digits
- long (these are the ones that start and end on
- half-hour or hour boundaries)
-
- 3. Both programs ask for today's date. They should
- instead get this from the computer itself but that is
- too much involved with O/S details.
-
- 4. Integers are used everywhere, even for time_of_day.
- a. You need to use a 32-bit computer
- b. So, nine o clock at night, comes out 2100
-
- 5. The VCRPLUS hardware uses "channel mapping" for
- channel numbers above 19, and for cable tv stations.
- Just decode some VCRPLUS code numbers from each unusual
- channel and get the "mapped channel" numbers. For
- example in this area the VCRPLUS people have
- mapped cable station ESPN to "channel 22".
-
-
-
-
-
- Example 1: encode nebraska deleware newyork
- This is a (deliberate) error. You should
- get back a message telling how to do it right:
- Usage: encode month day year channel starting_time length_in_minutes
-
-
-
- Example 2: decode newyork nebraska deleware
- Usage: decode todays_month todays_day todays_year Code_value_in_newspaper
-
-
-
- Example 3: encode 1 4 93 5 900 30
- You have asked for the VCRPLUS code of a tv show
- on January 4th of 1993, channel number 5, at 9 o clock
- (in the morning), that lasts for 30 minutes.
- The program answers back:
- 1 4 93 5 900 30 VCRPLUS_CODE= 19297
-
-
- Example 4: decode 1 2 93 19297
- On January 2nd of 1993 you have asked a question. You
- want to know "what show does the VCRPLUS code 19297
- represent?" The program answers back
- Code= 19297 1 4 93 Mapped_channel= 5 Start_time= 0900 Length= 30
-
-
-
-
-
- Have some fun with this stuff.